﻿using System;
using System.Windows.Browser;

namespace jLight
{
    public class jQueryEffectOptions:jQueryObjectBase
    {
        /// <summary>
        /// number determining how long the animation will run.
        /// </summary>
        public double Duration
        {
            set { ScriptObject.SetProperty("duration", value); }
            get { return (double)ScriptObject.GetProperty("duration"); }
        }   

        /// <summary>
        /// A string indicating which easing function to use for the transition. 
        /// </summary>
        public string Easing
        {
            set { ScriptObject.SetProperty("easing", value); }
            get { return (string)ScriptObject.GetProperty("easing"); }
        }
        
        /// <summary>
        /// A function to call once the animation is complete.
        /// </summary>
        public Func<object, object> Complete
        {
            set { ScriptObject.SetProperty("complete", jQueryFunction.CreateCallback1(value)); }          
        }

        /// <summary>
        /// A function to be called after each step of the animation.
        /// </summary>
        public Func<object, object> Step
        {
            set { ScriptObject.SetProperty("step", jQueryFunction.CreateCallback1(value)); }          
        }
        
        /// <summary>
        /// A Boolean indicating whether to place the animation in the 
        /// effects queue. If false, the animation will begin immediately.  
        /// </summary>
        public bool Queue
        {
            set { ScriptObject.SetProperty("queue", value); }
            get { return (bool)ScriptObject.GetProperty("queue"); }
        }
        
        /// <summary>
        ///  A map of one or more of the CSS properties defined by 
        /// the properties argument and their corresponding easing functions. 
        /// </summary>
        //public jQueryEffectSpecialEasing SpecialEasing
        //{
        //    set { ScriptObject.SetProperty("queue", value); }
        //    get { return (jQueryEffectSpecialEasing)ScriptObject.GetProperty("queue"); }
        //}
        public static implicit operator ScriptObject(jQueryEffectOptions effectOptions)
        {
            return effectOptions.ScriptObject;
        }
    }
}